#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    //只支持.wav格式的音频文件
    sound = new QSound(":/chicken.wav",this);

    connect(ui->pushButton,&QPushButton::clicked,this,[=](){
        //播放音乐
        sound->play();
    });
}

Widget::~Widget()
{
    delete ui;
}

